//
//  Kylin_cover.m
//  01-LotteryBaseFrame
//
//  Created by Kylin on 16/1/5.
//  Copyright © 2016年 kylin. All rights reserved.
//

#import "Kylin_Cover.h"

#define Kylin_KeyWindow [UIApplication sharedApplication].keyWindow
@implementation Kylin_Cover

+ (void)show{
   
    Kylin_Cover *cover = [[self alloc]init];
    cover.frame = [UIScreen mainScreen].bounds;
    cover.backgroundColor = [UIColor blackColor];
    cover.alpha = 0.6;
    
    [Kylin_KeyWindow addSubview:cover];
    
  
    
}

+ (void)hide{
    
    // 移除蒙板
    for (UIView *view in Kylin_KeyWindow.subviews) {
        if ([view isKindOfClass:self]) {
            [view removeFromSuperview];
            break;
        }
    }
}
@end
